[quality] test: cover commitsBehindStableV4 dispatch branches (pkg/hub/commit_behind.go) - #6205
[quality] test: cover commitsBehindStableV4 dispatch branches (pkg/hub/commit_behind.go)#6205kubestellar-hive[bot] wants to merge 1 commit into
Conversation
…b/commit_behind.go) commitsBehindStableV4 was 50% covered: only the cache-hit read path had tests. Cover the remaining dispatch branches: - same-commit short-circuit (prefix-matching base answers 0-behind with no compare dispatched) - empty-SHA guards (empty base, and missing stable-branch head SHA) - in-flight dedupe (a pending compare is not re-dispatched and answers unknown without blocking) - cache-miss async dispatch (stubbed fetch, canonical short-SHA key, result eventually cached and served) Function coverage: 50.0% -> 100.0%. No production code changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: hive-quality <quality@hive.local>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
What
Adds four tests to
src/pkg/hub/commit_behind_test.gocovering the uncovered dispatch branches ofcommitsBehindStableV4(was 50.0% function coverage; now 100.0%):fetchCommitBehindCount, verifies the canonical short-SHA key is used and the result is eventually cached and servedScope
Test-only; no production code changes. Files claimed:
src/pkg/hub/commit_behind_test.go(exercisingsrc/pkg/hub/commit_behind.go:commitsBehindStableV4). Disjoint from all open quality PRs (none touch commit_behind.go).Verification
go test -run 'CommitBehind|CommitsBehind' ./pkg/hub/passes;go vet ./pkg/hub/clean. (-raceunavailable in this environment: no gcc.)Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5